import request from '@/utils/request'

export function  updataFormTrigger(data) {
  return request({
    url:'/data/trigger/editTrigger',
    method:'put',
    data:data
  })
}

export function  delCase(id) {
  return request({
    url:'/data/case/' + id,
    method:'delete'
  })
}

export function  insertFormTrigger(query) {
  return request({
    url:'/data/trigger',
    method:'post',
    data:query
  })
}
export function insertForm(query) {
  return request({
    url:'/data/catalog/insert',
    method:'post',
    data:query
  })
}

export function TriggerList(query) {
  return request({
    url:'data/trigger/list',
    method:'get',
    params:query
  })
}

export function listAll(query) {
  return request({
    url:'/data/catalog/listAll',
    method:'get',
    params:query
  })
}

export function  delTrigger(id) {
  return request({
    url:'/data/trigger/' + id,
    method:'delete'
  })
}

//设施列表
export  function listFacility() {
  return request({
    url:'/data/facility/list',
    method:'get'
  })
}
//类别列表
export function listType(query) {
  return request({
    url:'/data/catalog/list',
    method:'get',
    params: query
  })
}
// 查询报警设置列表
export function listParameter(query) {
  return request({
    url: '/data/parameter/list',
    method: 'get',
    params: query
  })
}

// 查询报警设置详细
export function getParameter(id) {
  return request({
    url: '/data/parameter/' + id,
    method: 'get'
  })
}

// 新增报警设置
export function addParameter(data) {
  return request({
    url: '/data/parameter',
    method: 'post',
    data: data
  })
}

// 修改报警设置
export function updateParameter(data) {
  return request({
    url: '/data/parameter',
    method: 'put',
    data: data
  })
}

// 删除报警设置
export function delParameter(id) {
  return request({
    url: '/data/parameter/' + id,
    method: 'delete'
  })
}

// 导出报警设置
export function exportParameter(query) {
  return request({
    url: '/data/parameter/export',
    method: 'get',
    params: query
  })
}

export function updataForm(data){
  return request({
    url:'/data/catalog/editAll',
    method:'put',
    data:data
  })
}

export function delTriggerByCaseId() {
  return request({
    url:'/data/trigger/delTriggerByCaseId',
    method:'get',
  })
}


//删除Catalog
export function deleteCatalog(query) {
  return request({
    url:'/data/catalog/deleteCatalog',
    method:'post',
    data:query
  })
}
